package com.binyouwei.designpatterns.structural_type.adapter;

/**
 * @author 宾有为
 * @date 2024/7/11 19:54
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：适配器模式 - 通过一个中间件（适配器）将一个类的接口转换成客户期望的另一个接口，使原本不能一起工作的类能够协同工作。
 **/
public class AdapterMain {

    public static void main(String[] args) {
        AdapterAudioPlayer audioPlayer = new AdapterAudioPlayer();

        audioPlayer.play("mp3", "beyond the horizon.mp3");
        audioPlayer.play("mp4", "alone.mp4");
        audioPlayer.play("vlc", "far far away.vlc");
        audioPlayer.play("avi", "mind me.avi");
    }
}
